\name{makeSimulationData}
\alias{makeSimulationData}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Generate Simulation Data
}
\description{
Generate simulated gene expression data for nested mixture model.
}
\usage{
makeSimulationData(m = 5000, n = 50, prop.DE = 0.1, ngc = 4,
    model_type = 2, dist = "norm", effect.size = 2, rho = NULL,
    V = FALSE, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{m}{
Number of genes.
}
  \item{n}{
Number of samples.
}
  \item{prop.DE}{
Proportion of differentially expressed genes. i.e. proportion of genes with outlier samples.
}
  \item{ngc}{
Number of gene components.  Only work for 4 or 5.
}
  \item{model_type}{
Only work for 1, 2, 3, 4, or 5.
}
  \item{dist}{
Distribution of gene expression values.  "norm" or "t"
}
  \item{effect.size}{
Effect sizes for cancer outlier samples.
}
  \item{rho}{
Correlation coefficients for between genes.
}
  \item{V}{
Verbose mode.
}
  \item{\dots}{
%%     ~~Describe \code{\dots} here~~
}
}
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
%%  ~Describe the value returned
%%  If it is a LIST, use
%%  \item{comp1 }{Description of 'comp1'}
%%  \item{comp2 }{Description of 'comp2'}
%% ...
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
Tomonori Oura
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
library(nmixclust)

#Generate simulated data
set.seed(123)
simData <- makeSimulationData(
	m=2000
	,n=200
	,prop.DE=0.5
	,effect.size=2
	,ngc=4
	,dist="norm"
	,model_type=1
)

#Data generated
str(simData)

#Normalization by median and mad of normal samples
non.cancer <- simData$class==1
d.med <- apply(simData$data[, non.cancer],1,median)
d.mad <- apply(simData$data[, non.cancer],1,mad)
d <- (simData$data - d.med) / d.mad

}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
